var dtree;
var layer;
var $;
var element;
var util;
var form;
var laydate;
layui.extend({
    dtree: '/dTree/layui_ext/dtree/dtree'
}).use(['element','layer','util', 'dtree','jquery', 'form','laydate'], function(){
    dtree = layui.dtree;
    layer = layui.layer;
    $ = layui.jquery;
    element = layui.element;
    util = layui.util;
    form = layui.form;
    laydate = layui.laydate;
    laydate.render({
        elem: '#checkEndDate', //指定元素
        type: 'datetime',
        trigger: 'click' //时间时间为点击事件
    });
    laydate.render({
        elem: '#chargeEndDate', //指定元素
        type: 'datetime',
        trigger: 'click' //时间时间为点击事件
    });

    var sampleStatus1 = $('input[name=sampleStatusId]').val();
    $('#sampleStatus').val(sampleStatus1);
    form.render('select','selFilter');
});



/*委托单位穿梭框开始*/
function findCustomer(){
    layer.open({
        type:2,//弹出层类型
        title:"委托单位信息",
        area:[ '900px', '550px' ],
        maxmin:true,//最大和最小化
        shade:0,//遮罩
        offset: 'auto',//位置
        content:"/layer-sel-customer.html",
        success:function(){

        }
    });
}
/*委托单位穿梭框结束*/

/*型号规格穿梭框开始*/
function findSpares(){
    layer.open({
        type:2,
        title:'型号规格信息',
        area:['900px','550px'],
        maxmin:true,
        shade:0,
        offset:'auto',
        content:"/layer-sel-spares.html",
        success:function(){

        }

    });
}
/*型号规格穿梭框结束*/

/*点击修改开始*/
function wancheng() {
    $("input[name=sequenceno]").val($("#sequenceno").text());
    var Values = new FormData(document.getElementById('addForm'));
    $.ajax({
        url:"/selCustomer/updateEntrust",
        data:Values,
        type:"post",
        dataType:'text',
        contentType:false,
        processData:false,
        success:function (data) {
            alert(data);
            var layers=parent.layer;
            layers.close(layers.index);

        }
    })
}
/*点击修改结束*/
